package poo.exo1;

import poo.Exceptions.*;


public class CompteAction extends CompteSansLimite {

        private static final double versementInitial = 1000;
        private final double plafondCredit;

        public CompteAction(String nom, int numero, double solde, double plafond) throws SoldeMinimumRequis
        {
                super(nom, numero, solde);
               
                if(solde < CompteAction.getVersementInitial()){
                        throw new SoldeMinimumRequis("Le solde initial doit etre au minimum de "+CompteAction.getVersementInitial()+" euros\n", solde);
                }
               
                this.plafondCredit = plafond;
        }
        public double getPlafondCredit(){
                return this.plafondCredit;
        }
        public static double getVersementInitial() {
                return versementInitial;
        }
        @Override
        public String toString(){
                return super.toString();
        }
}